package com.hzhq.contract.bean.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hzhq.contract.bean.entity.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author hzhq
 * @create 2021/4/8 10:30 下午
 * @email hzhq1255@163.com
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("ContractDTO")
public class ContractDTO {

    @ApiModelProperty(value = "id")
    private ObjectId contractId;
    @ApiModelProperty(value = "合同名称")
    private String contractName;
    @ApiModelProperty(value = "合同种类")
    private ContractType contractType;
    @ApiModelProperty(value = "甲方公司")
    private List<CompanyDTO> companiesA;
    @ApiModelProperty(value = "乙方公司")
    private List<CompanyDTO> companiesB;
    @ApiModelProperty(value = "负责人")
    private String contactPerson;
    @ApiModelProperty(value = "负责人联系方式")
    private String contactPhone;
    @ApiModelProperty(value = "所属部门")
    private Depart depart;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "签订时间")
    private Date startTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "截止时间")
    private Date endTime;
    @ApiModelProperty(value = "合同金额")
    private BigDecimal contractAmount;
    @ApiModelProperty(value = "当前合同金额")
    private BigDecimal currentAmount;
    @ApiModelProperty(value = "自定义扩展字段")
    private List<Extern> externList;
    @ApiModelProperty(value = "合同创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    @ApiModelProperty(value = "录入人员")
    private User createUser;
    @ApiModelProperty(value = "采用模板id")
    private ObjectId templateId;
    @ApiModelProperty(value = "采用模板名称")
    private String templateName;
    @ApiModelProperty(value = "是否删除")
    private Integer deleted;
    @ApiModelProperty(value = "是否编辑")
    private Integer edited;
    @ApiModelProperty(value = "是否通过")
    private Integer passed;
    @ApiModelProperty(value = "是否完成")
    private Integer completed;
    @ApiModelProperty(value = "最后编辑人")
    private String lastEditedUser;
    @ApiModelProperty(value = "最后编辑时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date editedTime;
    @ApiModelProperty(value = "通过时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date passedTime;
    @ApiModelProperty(value = "审核人员")
    private String approvalPerson;
    @ApiModelProperty(value = "审批意见")
    private String approvalContent;


}
